use std::{ffi::{CString, OsString}, ptr::{self, null_mut}, os::windows::ffi::OsStringExt};

use winapi::{um::{ winnt::{MAKELANGID, LANG_NEUTRAL, SUBLANG_DEFAULT},
 winbase::{FORMAT_MESSAGE_ALLOCATE_BUFFER, FORMAT_MESSAGE_FROM_SYSTEM, 
    FormatMessageA, FORMAT_MESSAGE_IGNORE_INSERTS, FORMAT_MESSAGE_MAX_WIDTH_MASK, FormatMessageW}}, shared::winerror::HRESULT};

/// @Author: DengLibin
/// @Date: Create in 2024-01-16 20:54:58
/// @Description: 

pub mod helloworld;
pub mod wincrypt;
pub mod csp_rsa;
pub mod encrypt;
pub mod sign;
pub mod export_pub_key;
pub mod decrypt;
pub mod usb_key_decrypt;
fn main() {
    // let r = helloworld::print_message("hello world中文").unwrap();
    // wincrypt::hello_csp();
    // csp_rsa::hello_rsa();
    // encrypt::hello_encrypt();
    // sign::hello_encrypt();
    // export_pub_key::export();
    // decrypt::hello_dcrypt();
    let encrypt_data = "TGoiCFSxqI1czSN8K2MIio72z0TLU2BigYmGNZATdad/bNGsaFmvvyz/3QVTpkXW/9+IQb47YSjl9nOQriWhEZjIU33C8Jfw6qkseopjL+1VYw5m7kAe013blsC3OunPyx2ZRDFaWgPNzBip61AqK9wa4LtMdWrF8Bxxj9SRKZMTp3G2lCkh85UkW2Jgmh1DChtHmpGEox5rJTTntLoTBRf0JKtc+EAp6j7r+3OMUhlUnXPSZkwhvBbEB8s0MCNyO/G7NzLJ/O6DRMY2X61zGyAxLPb7XKUKuQKhQVjjyuvzLif+ock+rgPx35MlnurPsxZBh3um4EBvh8UeVAXQdg==";
    let s = usb_key_decrypt::decrypyt(encrypt_data);
    println!("{}", s);
}


